Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@alchemy/aa-core
Advanced tools
viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts
@alchemy/aa-core
This package contains the core interfaces and components for interacting with 4337 infrastructure. The primary interfaces that it exports are the SmartAccountProvider
and BaseSmartContractAccount
.
The SmartAccountProvider
is an EIP-1193 compliant Provider that wraps JSON RPC methods and some Wallet Methods (signing, sendTransaction, etc). With this Provider, you can submit User Operations to RPC providers, estimate gas, configure a Paymaster, send standard JSON RPC requests, and more. It is not opinionated about which RPC provider you are using and is configurable to work with any RPC provider. Because it implements EIP-1193, it can be used with any web3 library.
The BaseSmartContractAccount
interface defines how you would interact with your Smart Contract Account. Any class that extends BaseSmartContractAccount
may also expose additional methods that allow its connecting SmartAccountProvider
to provide ergonic utilities for building and submitting User Operation
s.
To get started, first install the package:
yarn add @alchemy/aa-core
npm i -s @alchemy/aa-core
pnpm i @alchemy/aa-core
You can create a provider like so:
import {
LightSmartContractAccount,
getDefaultLightAccountFactoryAddress,
} from "@alchemy/aa-accounts";
import {
LocalAccountSigner,
SmartAccountProvider,
SmartAccountSigner,
} from "@alchemy/aa-core";
import { polygonMumbai } from "viem/chains";
const chain = polygonMumbai;
const owner: SmartAccountSigner =
LocalAccountSigner.mnemonicToAccountSigner(YOUR_OWNER_MNEMONIC);
export const provider = new SmartAccountProvider({
rpcProvider: "https://polygon-mumbai.g.alchemy.com/v2/demo",
chain,
}).connect(
(rpcClient) =>
new LightSmartContractAccount({
chain,
factoryAddress: getDefaultLightAccountFactoryAddress(chain),
rpcClient,
owner,
})
);
1.2.4 (2024-01-08)
Note: Version bump only for package root
FAQs
viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts
The npm package @alchemy/aa-core receives a total of 6,640 weekly downloads. As such, @alchemy/aa-core popularity was classified as popular.
We found that @alchemy/aa-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.